
//js used by invite friend
$(document).ready(function()
{
	
	var inviteFriendValidate=$("#friend_invite_form").validate(
	{
		rules:
		{
			friend_email: {required:true},
			vcode: { required:true }
		},
		messages:
		{
			friend_email: {required:"请输入您邀请的朋友Email地址"},
			vcode: { required:"请输入验证码"}
		},
		submitHandler: function(form) 
		{
			return true;
		}
	});
	
   //$("#vbox").hide();  
   
   $("#vcode").click(function(){
      
	    $("#vimg").attr('src', edp_domain_url + 'vcode/?tiny='+Math.random());
	    $("#vbox").show();  
	         
   }); 
   
});

function refresh_vcode(url){
 
   $("#vimg").attr('src',url);
 
}

$(document).ready(function()
{
	function jump(count) 
	{   
		window.setTimeout(function()
		{   
			count--;   
			if(count > 0) 
			{   
				$('#num').attr('innerHTML', count);   
				jump(count);   
			} 
			else 
			{   
				window.location.href=$("#auto_jump_url").val();   
			}   
		}, 1000);   
	};   
	
	if($("#auto_jump_url").size()>0)
		jump(5);
});
